window.p ="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCn4W4L8y9+7ilmo8NxjofiJZSG7fKxb6Bgaxw+SBXSPg9uK2NwwRPVuCVHozP6fHGYdrjPs7rOVaPSe7M/hPDsGXgcWH1xgrO99rQRQFYvFOFY8ptwu/V3W9YkolX5O7Iszv00RzkmKmR6z811ogQdC3w20tHiNjTn4gessCKp6wIDAQAB";
window.a = 'OFhBGAa6XB6sLdY02ozh8UIeksgWnNAgpv8Nzi8wZnDnosBCSgLQ'
var n = window.p
var encrypt = new JSEncrypt();
encrypt.setPublicKey(n);
b = encrypt.encrypt(window.a);
window.ajax = function(url, type, data = {}) {
	var response_ = []
	$.ajax({
		url: url,
		dataType: 'json', //服务器返回json格式数据
		type: type, //HTTP请求类型
		data: data,
		async: false,
		beforeSend: function(XMLHttpRequest) {
			XMLHttpRequest.setRequestHeader("csrf_token", b);
		},
		timeout: 5000, //超时时间设置为5秒；
		success: function(response) {
			if (response.status === 0) {
				response_ = response
			} else {
				console.debug(response.msg)
			}
		},
		error: function() {
			console.debug('数据请求异常!请联系管理员')
		}
	});
	return response_
};
